package com.stlm2.dems.entity;

/**
 * 退款状态
 */
public enum RefundState {

    Apply(1) {
        public String toString() {
            return "退款申请";
        }
    },
    Refuse(2) {
        public String toString() {
            return "拒绝退款";
        }
    },
    Success(3) {
        public String toString() {
            return "成功退款";
        }
    },
    Shutdown(4) {
        public String toString() {
            return "退款关闭";
        }
    };

    private final int val;

    RefundState(int n) {
        val = n;
    }

    public int getIntValue() {
        return val;
    }

    public static RefundState getByIntValue(int n) {
        switch (n) {
            case 1:
                return Apply;
            case 2:
                return Refuse;
            case 3:
                return Success;
            case 4:
                return Shutdown;
            default:
                return null;
        }
    }

}
